package org.example.aienglishapp.dto.login;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.sql.Timestamp;
import java.util.List;

public class UserResponseDTO {

    private Long userId;
    private String userName;
    private String phone;
    private Integer userStatus;

    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private Timestamp registrationTime;

    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private Timestamp lastLoginTime;

    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private Timestamp lastModifiedTime;

    private Integer userPoints;
    private Integer experiencePoints;
    private String nickname;
    private String userAvatar;
    private String signature;
    private String gender;
    private Integer age;
    private List<String> roles;
    private List<String> permissions;

    private String token;

    // 无参构造函数
    public UserResponseDTO() {
    }

    // 带参构造函数
    public UserResponseDTO(Long userId, String userName, String phone, Integer userStatus,
                           Timestamp registrationTime, Timestamp lastLoginTime, Timestamp lastModifiedTime,
                           Integer userPoints, Integer experiencePoints, String nickname, String userAvatar,
                           String signature, String gender, Integer age, List<String> roles, List<String> permissions, String token) {
        this.userId = userId;
        this.userName = userName;
        this.phone = phone;
        this.userStatus = userStatus;
        this.registrationTime = registrationTime;
        this.lastLoginTime = lastLoginTime;
        this.lastModifiedTime = lastModifiedTime;
        this.userPoints = userPoints;
        this.experiencePoints = experiencePoints;
        this.nickname = nickname;
        this.userAvatar = userAvatar;
        this.signature = signature;
        this.gender = gender;
        this.age = age;
        this.roles = roles;
        this.permissions = permissions;
        this.token = token;
    }

    // Getter 和 Setter
    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public Integer getUserStatus() {
        return userStatus;
    }

    public void setUserStatus(Integer userStatus) {
        this.userStatus = userStatus;
    }

    public Timestamp getRegistrationTime() {
        return registrationTime;
    }

    public void setRegistrationTime(Timestamp registrationTime) {
        this.registrationTime = registrationTime;
    }

    public Timestamp getLastLoginTime() {
        return lastLoginTime;
    }

    public void setLastLoginTime(Timestamp lastLoginTime) {
        this.lastLoginTime = lastLoginTime;
    }

    public Timestamp getLastModifiedTime() {
        return lastModifiedTime;
    }

    public void setLastModifiedTime(Timestamp lastModifiedTime) {
        this.lastModifiedTime = lastModifiedTime;
    }

    public Integer getUserPoints() {
        return userPoints;
    }

    public void setUserPoints(Integer userPoints) {
        this.userPoints = userPoints;
    }

    public Integer getExperiencePoints() {
        return experiencePoints;
    }

    public void setExperiencePoints(Integer experiencePoints) {
        this.experiencePoints = experiencePoints;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getUserAvatar() {
        return userAvatar;
    }

    public void setUserAvatar(String userAvatar) {
        this.userAvatar = userAvatar;
    }

    public String getSignature() {
        return signature;
    }

    public void setSignature(String signature) {
        this.signature = signature;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public List<String> getRoles() {
        return roles;
    }

    public void setRoles(List<String> roles) {
        this.roles = roles;
    }

    public List<String> getPermissions() {
        return permissions;
    }

    public void setPermissions(List<String> permissions) {
        this.permissions = permissions;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    @Override
    public String toString() {
        return "UserResponseDTO{" +
                "userId=" + userId +
                ", userName='" + userName + '\'' +
                ", phone='" + phone + '\'' +
                ", userStatus=" + userStatus +
                ", registrationTime=" + registrationTime +
                ", lastLoginTime=" + lastLoginTime +
                ", lastModifiedTime=" + lastModifiedTime +
                ", userPoints=" + userPoints +
                ", experiencePoints=" + experiencePoints +
                ", nickname='" + nickname + '\'' +
                ", userAvatar='" + userAvatar + '\'' +
                ", signature='" + signature + '\'' +
                ", gender='" + gender + '\'' +
                ", age=" + age +
                ", roles=" + roles +
                ", permissions=" + permissions +
                ", token='" + token + '\'' +
                '}';
    }
}